﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace _201206QuanLyBanHang.ChucNang
{
    class BLL_chiphididuong
    {
         DataConn da;
         public BLL_chiphididuong()
        {
            da = new DataConn();
        }
         public DataSet getchiphididuong(string strsql)
        {
            return da.ExectueQueryDataset(strsql, CommandType.Text, null);
        }
         public bool insertchiphididuong(ref string err, int Machiphi, string Tenchiphi, string GhiChucpdd)
        {
            return da.MyExecuteNonQuery("Pro_Insert_chiphididuong", CommandType.StoredProcedure, ref err, new SqlParameter("@machiphi",Machiphi), new SqlParameter("@tenchiphi",Tenchiphi), new SqlParameter("@ghichucpdd",GhiChucpdd));
        }
        public bool deletechiphididuong(ref string err, int Machiphi)
        {
            return da.MyExecuteNonQuery("Pro_Delete_chiphididuong", CommandType.StoredProcedure, ref err, new SqlParameter("@machiphi", Machiphi));
        }
        public bool updateDautu(ref string err, int Machiphi, string Tenchiphi, string GhiChucpdd)
        {
            return da.MyExecuteNonQuery("Pro_Update_Dautu", CommandType.StoredProcedure, ref err, new SqlParameter("@machiphi", Machiphi), new SqlParameter("@tenchiphi", Tenchiphi), new SqlParameter("@ghichucpdd", GhiChucpdd));
        }
        public object layma(ref string err, string str)
        {

            return da.lay(str, CommandType.Text, ref err);


        }
    }
}
